add Nix flake and better Nix support #553
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a fairly new user of NixOS, I found that the current nixpkg is very outdated.
After discovering this, I decided to package auto-cpufreq myself so I could enjoy it from the latest releases. Also as someone who has been helping develop parts of auto-cpufreq, I wanted to setup a Nix dev environment through a
flake.nix
file. I also rewrote my Nix package to work with the flake and created a NixOS module that any NixOS user can take advantage of. This will allow us to keep up with the latest changes ofauto-cpufreq
without worrying that the nixpkg is outdated.Note that the
flake.lock
file will need to be updated every once in a while to keep up with changes to Python, packages, etc... This is super easy and I can take care of this as needed. It could even be setup automatically through a GitHub action if we so wishIn addition to the flake, I have updated the README to include info about how to install on NixOS and have updated
auto-cpufreq-installer
to exit and give the user a message upon detection of NixOSIn the meantime, I do plan on writing a PR to update the nixpkg to the latest release, but I still think this is a good change for the minority of Nix users :)